Activity activity = MainActivity.this;  
    while (activity.getParent() != null) {  
		activity = activity.getParent();  
    }
DialogResult result = new MtwDialog(activity).showDialog(DialogType.Waring, this.getResources().getString(R.string.mtw_backbuttonpresstip));